class FooReplacer{
    static [Symbol.replace](target, replacement) {
        return target.split('foo').join(replacement);
    };
};